<?php
namespace App\Services;

use App\Models\User;
use fun\addons\Service;

class UserServices extends BaseServices
{
    /**
     * @param $username
     * @return \Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Eloquent\Model|object|null
     */
    public function getByUsername($username)
    {
        return User::query()
            ->where('username',$username)
            ->where('deleted',0)
            ->first();

    }

    public function getByMobile($mobile)
    {
        return User::query()
            ->where('mobile',$mobile)
            ->where('deleted',0)
            ->first();

    }

}
